<div style="border: solid 1px red; padding: 20px">

<h3>Select Equipment for <%= @customer.first_name %></h3>

<hr>

<% form_tag :controller => 'rental', :action => 'equipment', :method => 'get' do %>
      <%= text_field_tag :search, params[:search], :id => 'search_field' %>
      <%= submit_tag "Search", :name => nil %>
      <%= link_to_function "Clear", "$('search_field').clear()" %>
 <% end %>

<div id="right" style="text-align:left;width:50%;padding-top:7px;">
<h3>Cart</h3>
  <%= render (:partial => "cart") %>
</div>

<br />

<h3>Equipment</h3>
<table id="equipment_table" class="tablesorter" style="width:49%">
<thead>
    <tr>
      <th>Name</th>
      <th>Size</th>
      <th>Description</th>
      <th>Category</th>
      <th>Add to Cart</th>
    </tr>
</thead>
<tbody id="tablecontent" overflow: scroll;">
<% @equipment.each do |eE| %>
    <tr>
        <td>
            <%= eE.name %>
        </td>
        <td>
            <%= eE.size %>
        </td>
        <td>
            <%= eE.description %>
        </td>
        <td>
            <%= eE.category %>
        </td>
        <td>
            <%= link_to "Add", {:action => "add_to_cart", :id => eE.id} %>
        </td>
    </tr>
<% end %>
</tbody>
</table>



<br />
<hr>

<%= link_to "Back", :action => 'customer' %>
<span class="right"><%= link_to "Continue", :action => 'dates' %></span>
<br />

<script type="text/javascript">
    $("#equipment_table").tablesorter();
    //$("#nav").css('width', $(window).width() - 50 + 'px');


</script>

</div>

